<h2>车牌号: <?php echo $model->plate_no; ?> 的交通事故记录</h2>

<div class="actionBar1">
<?php 
	if(isset($_GET['ok'])) {if($_GET['ok']==0) $mess='添加成功！'; else $mess='更新成功！';unset($_GET['ok']);}//判断添加/更新信息
	$act=isset($_GET['ret'])?$_GET['ret']:$ret;//判断show以后返回路径
	unset($_GET['ret']);unset($_GET['id']);
	$url=array($act)+$_GET;
?>
[<?php echo CHtml::link('返回',$url); ?>]
</div>

<table class="dataGrid" style="width:80%">
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('plate_no')); ?>
</th>
    <td><?php echo CHtml::encode($model->plate_no); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('driver_name')); ?>
</th>
    <td><?php echo CHtml::encode($model->driver_name); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('property_owner')); ?>
</th>
    <td><?php echo CHtml::encode($model->property_owner); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('accident_date')); ?>
</th>
    <td><?php echo CHtml::encode($model->accident_date); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('accident_place')); ?>
</th>
    <td><?php echo CHtml::encode($model->accident_place); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('case_end_date')); ?>
</th>
    <td><?php echo CHtml::encode($model->case_end_date); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('accept_company')); ?>
</th>
    <td><?php echo CHtml::encode($model->accept_company); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('agent')); ?>
</th>
    <td><?php echo CHtml::encode($model->agent); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('compensation_received_date')); ?>
</th>
    <td><?php echo CHtml::encode($model->compensation_received_date); ?>
</td>
</tr>
<?php foreach($detail_models as $n=>$val):?>
<tr class="<?php echo $n%2?'even':'odd';?>">
	<th class="label"><?php echo CHtml::encode($val->getAttributeLabel('cost_name').($n+1)); ?>
</th>
    <td><?php echo CHtml::encode($val->cost_name); ?>
</td>
</tr>
<tr class="<?php echo $n%2?'even':'odd';?>">
	<th class="label"><?php echo CHtml::encode($val->getAttributeLabel('cost_amount').($n+1)); ?>
</th>
    <td><?php echo CHtml::encode($val->cost_amount); ?>
</td>
</tr>
<?php endforeach;?>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('accident_cost')); ?>
</th>
    <td><?php echo CHtml::encode($model->accident_cost); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('compensation_amount')); ?>
</th>
    <td><?php echo CHtml::encode($model->compensation_amount); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('cost_margin')); ?>
</th>
    <td><?php echo CHtml::encode($model->cost_margin); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('driver_share_rate')); ?>
</th>
    <td><?php echo CHtml::encode($model->driver_share_rate*100,'%d%%'); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('ulti_loss_amount')); ?>
</th>
    <td><?php echo CHtml::encode($model->ulti_loss_amount); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('accident_detail')); ?>
</th>
    <td><?php echo CHtml::encode($model->accident_detail); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('create_time')); ?>
</th>
    <td><?php echo CHtml::encode($model->create_time); ?>
</td>
</tr>
</table>
<?php if(isset($mess)) echo "<script>alert('$mess');</script>";?>
<div class="actionBar1">[<?php echo CHtml::link('返回',$url); ?>]
</div>
